Похожие чаты

As far as I have understood, in Maven, there are

some predefined project build and packaging templates. A user can modify them to reach the required template. I wanna know whether a user can create a build template from scratch?

Assume this project:
mavenProject1 (parent)
package1
class1.java
class2.java
resources
pic1.png
mavenProject2
package1
class1.java

I wanna my package creation be like:
/mavenProject1/package1/class1.java -> /class1.class
/mavenProject1/resources/pic1.png -> /pic1.png

So the desired build template would be:
mavenOutput
class1.class
pic1.png

Can I use maven to turn the source code into such an object package? If yes, what keyword should I google for?

3 ответов

13 просмотров

Even though I don't fully understand what exactly you're trying to achieve... I recommend to not diverge from standard layout used virtually everywhere. Find any popular java project in github that uses maven - 99.99% it will follow standard layout instead of trying to do something custom. Are you trying to filter out "class2" from your output? And why project2 is demonstrated here at all?

required-optional Автор вопроса

Yes I am exactly doing this dirty job XD (And yes, I should refactor my structures instead of such a solutions. But it is not an easy option at the current time. Furthermore, I wanna do it with maven to learn it. Just for fun.)

required optional
Yes I am exactly doing this dirty job XD (And yes,...

For filtering out things from your target archive use this https://maven.apache.org/plugins/maven-jar-plugin/examples/include-exclude.html

Похожие вопросы

Обсуждают сегодня

я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
49
30 BCH videos in Hausa Language successfully delivered. In December 2023, I created a Flipstarter to produce Bitcoin Cash videos in the Hausa language for greater outreach an...
Munnir
5
читать файл максимально быстро? странный вопрос))
zamtmn
53
Интересно, а майкрософт 365 может запустится на линукс минт?
Лисицка
17
How to create an OS in C? what to study?
Linus
18
Компания Elif ищет менеджера проектов, который будет заниматься поиском и ведением новых проектов. Прежде чем приступить к работе, вам нужно пройти наш недельный курс, где вы ...
Elif
5
братва! где куличи брать?
Alöscha
25
Привет, кто может сделать юзербота с апи? Задачи: - создавать группы - создавать каналы - задавать для созданных каналов аватарку или эмоджи, имя группы - добавлять в группы...
Lencore
11
на сколько можно увеличить swap при 16Гб оперативы?
Хасан Ахмаев
11
тоесть, указав return eax, сгенерируется никому ненужная инструкция mov eax,eax ?
Aiwan \ (•◡•) / _bot
24
Карта сайта