У меня есть проект в Eclipse, и я использую POM файл, чтобы импортировать мой класс:ANT затмение и buildpath
<groupId>fr.moon.verify</groupId>
<artifactId>verify</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>verify</name>
и создать войну.
Моя проблема, что у меня есть еще классы в других папках внутри затмить
src/wolf/create/[classes]
src1/wolf1/create1/[classes]
и каждый раз, когда я прохожу проект в другой компьютер, я должен импортировать эти классы в ручном режиме.
Есть ли система, использующая POM или ANT для автоматического импорта моего класса?
Благодарим за помощь!
Мой П:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.moon.verify</groupId>
<artifactId>verify</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>verify</name>
<build>
<finalName>verify</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<!-- use the following artifactId if you don't need servlet 2.x compatibility -->
<!-- artifactId>jersey-container-servlet</artifactId -->
</dependency>
<dependency>
<groupId>org.glassfish.jersey.bundles</groupId>
<artifactId>jaxrs-ri</artifactId>
</dependency>
<!-- <dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-moxy</artifactId>
</dependency> -->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<!-- added to retrieve server path -->
<!-- <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version> <scope>provided</scope> </dependency> -->
<dependency>
<groupId>com.github.fge</groupId>
<artifactId>json-schema-validator</artifactId>
<version>2.2.6</version>
</dependency>
<!-- http://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160212</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
<properties>
<jersey.version>2.22.1</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
Насколько я знаю, maven требует точной структуры файлов, которую вы должны сохранить, чтобы заставить ее работать. –
Я добавляю мой pom-файл, если это полезно. – Lilli
Я имею в виду - попробуйте следовать правилам [this] (https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html), и все будет проще. –